<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta  name="Generator"  content="ECSHOP v2.7.2">
<meta  charset="utf-8">
<meta  name="viewport"  content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta  name="format-detection"  content="telephone=no">
<meta  name="apple-mobile-web-app-capable"  content="yes">
<meta  name="apple-mobile-web-app-status-bar-style"  content="black">
<meta  name="MobileOptimized"  content="320">
<title>好邻居{$getshop.name}</title>
<link  rel="stylesheet"  type="text/css"  href="http://static.e24c.com/m_e24c_com/themes/new/index_p/css/reset.css">
<link  rel="stylesheet"  type="text/css"  href="http://static.e24c.com/m_e24c_com/themes/new/index_p/css/main.css">

<style>
	.black_overlay{display: none;position: absolute;margin:0 auto;top:0px;left:0px;right:0px;bottom:0px;width:100%; height:1000px; ;z-index:1001; -moz-opacity: 0.7; opacity:.70;background-color: black; filter: alpha(opacity=77); }	
	.jian_scan{border-radius:2px;float:left;border:1px solid #bbb;color:#bbb;height:25px;width:25px;display:block;text-align:center;line-height:25px;font-size:16px;}
	.jia_scan{border-radius:2px;float:left;border:1px solid #bbb;color:#bbb;height:25px;width:25px;display:block;text-align:center;line-height:25px;font-size:16px;}
	.number_scan{border-radius:2px;float:left;margin-left:5px;margin-right:5px; border:#bbb 1px solid;background-color:#fff;width:35px;height:25px;line-height:25px;text-align:center;color:#666;}
	.number_scan input{}
	
</style>
<script>

var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?3409a76a3f9e17db8a5a91a75b16a35c";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</head>
<body  style="cursor: auto;">
<form id="form1" name="form1"  method="post" action="http://m.e24c.com/index_p/scan_code_s.php?act=activity_order&id={$getshop.id}&activ={$activ}">
<input type="hidden" name="openid"  value="{$openid}"/>
<input type="hidden" id="hgoodsid" name="goodsid"  value="{$getshop.goods_id}"/>
<input type="hidden" id="getnumber" name="getnumber"  value="1"/>
</form>
<div  id="wrapper" style="min-height:700px;">
    <div  id="container">
        <div  id="detailSlider"  class="detailSlider">
            
                <img  src="http://static.e24c.com/{if $heard_url eq ''}/{$getshop.goods_img}{else}{$heard_url}{/if}" style="width:100%;border-bottom:1px solid #eee;" />
            	
           
            <div  class="sliderPrev sprite"></div>
            <div  class="sliderNext sprite"></div>
        </div>
        <form  action=""  method="post"  name="ECS_FORMBUY"  id="ECS_FORMBUY">
        <div  class="productDetail">
		 <div  class="price f_666">
		 <p>{$res_goods_name.goods_name}</p>
		 </div>
		 <div>
           <div  class="price f_666" style="float:left;margin-top:5px;"><b style="color:#ff9933;font-size:16px;">{$getshop.why_price}元</b>&nbsp;&nbsp;|&nbsp;&nbsp;<span style="margin-left:-5px;font-weight:none;text-decoration:line-through;color:#aaa;font-size:14px;">&nbsp;&nbsp;{$getshop.original_price}元</span></font></span></div>
		   <div style="float:right;">
		   		 <a href="javascript:void(0)"  id="share" class="share click">
				<img src="/themes/new/index_p/css/fenx_1.png" width="45px" height="45px" style="margin-right:10px;"/>
				</a>
		   </div>
		  </div>
        </div>
		<div  class="description" style="border-bottom:none;">
			<h4 style="font-size:14px;">商品描述：</h4>
			<p  class="f_666" style="font-size:14px;">{$getshop.goods_brief}</p>
			
			 <!-- <div style="text-align:center;"><img src="/data/images/{$getshop.heard_url}" style="margin-top:10px;width:80%;"></div> -->
			
			
            
        </div>
		<div style="width:100%;margin:0px auto;position:fixed;bottom:0;background-color:#eee;height:50px;border-top:1px solid #bababa;z-index:999;">
		<div style="margin:15px 10px;">
			<!-- 还剩<span style="color:#ff9933;">{$counts_sum.goods_number}</span>件&nbsp;&nbsp;{if $types eq 1}|&nbsp;&nbsp;共{$counts_sum.goods_sum}件{/if}-->
			<!--
			<font style="float:left;">
				<span style="float:left;font-size:14px;font-weight:bold;color:#444;margin-top:4px;">数量：</span>
				<span class="jian_scan" id="jian">-</span>
				<span class="number_scan" id="num">1</span>
				<span class="jia_scan" id="add">+</span>
			</font>
			-->
		</div>
			<div style="float:right;margin-right:10px;padding:0px;color:#fff;font-size:16px;height:38px;line-height:38px; text-align:center;background-color:#f7cc88;width:130px;border-radius:5px;margin:-8px auto;font-weight:bold;margin-right:10px;">
				{if $types eq 1}
						{if $yimiao eq 3}
							<a href="javascript:void(0);" onclick="layer.msg('你已秒到该商品', 2, -1);" style="display:block;height:38px;color:#ae7110;">已购买</a>
						{elseif $counts_sum.goods_number le 0}
							<a href="javascript:void(0);" onclick="layer.msg('库存已经没有了', 2, -1);" style="border-radius:5px;display:block;height:38px;color:#fff;background-color:#ababab;">已卖完</a>
						{else}
							<a href="javascript:void(0);" onclick="callpaywraper({$getshop.goods_id},{$activ})" style="display:block;height:38px;color:#ae7110;">立即购买</a>
						{/if}
				{elseif $types eq 2}
						<a href="javascript:;" sb="1" onclick="layer.msg('活动已结束', 2, -1);" class="" style="color:#ae7110;">活动已结束</a>	 
				{else}
					<a href="javascript:;" sb="1" onclick="layer.msg('活动未开始', 2, -1);" class="" style="color:#ae7110;">活动未开始</a>	 
				
				{/if}
			</div>
		</div>
		
		</form>	
</div> 
	<!-- <div style=" position:fixed;bottom:0;margin0px;padding:0px;color:#fff;font-size:18px;height:48px;line-height:48px; text-align:center;background-color:#bc0000;width:100%;margin:0px auto;font-weight:bold;">
		<a href="javascript:void(0);" onclick="callpaywraper({$getshop.goods_id},{$activ})" style="display:block;height:48px;color:#fff;">立即购买</a>
          </div> -->	
		  <div id="fade" class="black_overlay"><a class="bin" href="javascript:void(0)" style="display:none;"><img class="code" style="position:fixed;top:0;margin-left:-73px;margin-top:-12px;width:450px;height:300px;z-index:999;" src="" alt="barcode" /></a></div> 
</div>
<script type="text/javascript" src="http://static.e24c.com/m_e24c_com/themes/new/index_p/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript"  src="http://static.e24c.com/m_e24c_com/themes/new/index_p/css/common.js"></script>
<script type="text/javascript" src="http://static.e24c.com/m_e24c_com/themes/new/index_p/js/layer/layer.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<!-- <script type="text/javascript" src="/../themes/new/scratch/js/wScratchPad.js"></script> -->
<script language="javascript">
$(document).ready(function(){
$("#add").click(function(){
	var n=$("#num").html();
    var num=parseInt(n)+1;
    var openid = '{$openid}';//openid
    var goodsid = {$getshop.goods_id};
    $.post('scan_code_s.php?act=get_goods_number',{
			num : num,
			openid : openid,
			goodsid : goodsid,
	}, function(data) {
		if(data == 1){
			if(num==0){alert("cc");}
		  	$("#num").html(num);
		  	$("#getnumber").val(num);
		}else{
			//库存不够
			alert('库存只有这么多了');
			if(num==0){alert("cc");}
		  	$("#num").html(num-1);
		  	$("#getnumber").val(num-1);
		}
    });
 	
});

$("#jian").click(function(){
var n=$("#num").html();
  var num=parseInt(n)-1;
   if(num==0){alert("不能为0"); return;}
  $("#num").html(num);
  $("#getnumber").val(num);
  });

});
<!-- $('.share').click(function(){
	<!-- alert(1); -->
<!-- }); --> -->
	//禁止网站打开
	var useragent = navigator.userAgent;
	if(useragent.match(/MicroMessenger/i)!='MicroMessenger'){
		//alert('已禁止本次访问：您必须使用微信内置浏览器访问本页面');
		//var opened = window.open('about:blank','_self');
		//opened.opener = null;
		//opened.close();
	}
	function callpaywraper(goodsid){
		//window.location ='activity_order.php?openid='+openid+'&goodsid='+goodsid;
        //$('#hgoodsid').val(goodsid);
        var num = $('#num').html();
        if(num == 0){
        	alert('购买数量不能为0');return false; 
        }
        document.form1.submit();
	}
	  // 注意：所有的JS接口只能在公众号绑定的域名下调用，公众号开发者需要先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”。 
	  // 如果发现在 Android 不能分享自定义内容，请到官网下载最新的包覆盖安装，Android 自定义分享接口需升级至 6.0.2.58 版本及以上。
	  // 完整 JS-SDK 文档地址：http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html
	  wx.config({
	    appId: '{$signPackage.appId}',
	    timestamp: '{$signPackage.timestamp}',
	    nonceStr: '{$signPackage.nonceStr}',
	    signature: '{$signPackage.signature}',
	    debug: false,
	    jsApiList: [
	      // 所有要调用的 API 都要加到这个列表中
	      'hideOptionMenu',
	      'onMenuShareTimeline',
	      'hideMenuItems',
	      'onMenuShareAppMessage',
	    ]
	  });
	  wx.ready(function () {
	    wx.hideMenuItems({
	   		menuList: ['menuItem:copyUrl'] // 要隐藏的菜单项，所有menu项见附录3
	    });
	    //alert('成功');
	    // 在这里调用 API
	    //ff();
	    ff();
	    tt();
	  });
	  //发送给好友
	function tt(){
	  	wx.onMenuShareAppMessage({
		    title: '「好邻居」海南空运芒果5.8折了', // 分享标题
//		    desc: '{$res_goods_name.goods_name}', // 分享描述
		    desc: '新鲜直达，夏日不能错过的甜蜜选择',
		    //link: 'http://m.e24c.com/index_p/scan_code_s.php?act=share&key=1&actid={$actid}&goodsid={$goodsid}&from=timeline&isappinstalled=0', // 分享链接
		    //link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdafc634908061c97&redirect_uri=http://www.e24c.com/weixin/oauth2.php&response_type=code&scope=snsapi_base&state={$activ}#wechat_redirect',
			link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdafc634908061c97&redirect_uri=http://www.e24c.com/weixin/oauth2.php&response_type=code&scope=snsapi_base&state=22#wechat_redirect',
			imgUrl: 'http://m.e24c.com/{$getshop.goods_img}', // 分享图标
		    type: '', // 分享类型,music、video或link，不填默认为link
		    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
		    success: function(){
		        // 用户确认分享后执行的回调函数
		        
		        $.post('../../wxjs_sdk/jssdkhelper.php?act=add_share_number',{
					openid : '{$openid}',
					goodsid : {$getshop.id},
					act_id : {$activ},
					types : 1,
					share_page : 2,			    	
			    	},function(res1){
					 
			   	 });
		    },
		    cancel: function(){ 
		        // 用户取消分享后执行的回调函数
		    }
		});
	}
	//朋友圈
	  function ff(){
	    // wx.hideOptionMenu();
	    wx.onMenuShareTimeline({
	        title: '「好邻居」海南空运芒果5.8折了', // 分享标题
	        //desc: '{$res_goods_name.goods_name}',
	        desc: '天干就要多喝水，雾霾就要多喝水，下沙就要多喝水……',
		    //link: 'http://m.e24c.com/index_p/scan_code_s.php?act=share&key=1&actid={$actid}&goodsid={$goodsid}&from=timeline&isappinstalled=0', // 分享链接
		    //link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdafc634908061c97&redirect_uri=http://www.e24c.com/weixin/oauth2.php&response_type=code&scope=snsapi_base&state={$activ}#wechat_redirect',
	        link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdafc634908061c97&redirect_uri=http://www.e24c.com/weixin/oauth2.php&response_type=code&scope=snsapi_base&state=22#wechat_redirect',
	        imgUrl: 'http://m.e24c.com/{$getshop.goods_img}', // 分享图标
	        trigger:function(res){
	          //alert('触发成功');
	        },
	        success: function (res1) { 
	          //分享成功
			    $.post('../../wxjs_sdk/jssdkhelper.php?act=add_share_number',{
					openid : '{$openid}',
					goodsid : {$getshop.id},
					act_id : {$activ},
					types : 2,
					share_page : 2,			    	
			    	},function(res1){
					 
			   	 });
	        },
	        cancel: function (res) { 
	            //alert('分享失败');
	            // 用户取消分享后执行的回调函数
	        }
	    });
	  }
//////////////////////////////////////////////////////////////////
var timer;
	function getCode(){
	                $('.code').attr('src','/themes/new/index_p/css/bb.png');
					
					$('#light').fadeIn('1000', function() {
						$('#light').show();
					});
					$('#fade').fadeIn('1000', function() {
						$('#fade').show();
					});
		$('.bin').show();
	}

	$('.click').click(function(){
		
		getCode();

		timer=timer = $.timer(30000, getCode);
	//	getCode();
	})
	$('.bin').click(function(){
		$('.code').attr('src','');
		$('#light').hide();
		$('#fade').hide();
		timer.stop();
		//$('body').stopTime ('codetimer');
	})
	
	//提醒我
$('.remind').click(function(){
	var openid = '{$openid}';//openid
	var activitie_id = {$activ};//活动id
	var activitie_time = '{$next_time_s}';//活动开始时间
	var goodsid = $(this).attr('id');
	var types = $(this).attr('sb');
	$.post('activitie.php?act=remind',{
			openid : openid,
			activitie_id : activitie_id,
			activitie_time : activitie_time,
			goodsid : goodsid,
			types : types,
	}, function(data) {
		var data = eval('('+data+')');
		if(data.status == 0){
			layer.msg('信息传输失败', 2, -1);
		}else if(data.status == 1){
			if(data.types == 2){
				$('#'+data.goodsid).attr('sb',data.types);
				$('#'+data.goodsid).html('取消提醒');
				<!-- $('#'+data.goodsid).attr('style','background-color:#928673'); -->
				layer.msg('设置成功！在秒杀前两分钟提醒', 2, -1);
			}else{
				$('#'+data.goodsid).attr('sb',data.types);
				$('#'+data.goodsid).html('提醒我');
				<!-- $('#'+data.goodsid).attr('style','background-color:#f7cc88'); -->
				layer.msg('取消提醒成功！', 2, -1);
			}
			
		}else{
			layer.msg('网络错误', 2, -1);
		}
    });
})


</script>
</body>
</html>